const { DataTypes, Model, Deferrable } = require("sequelize");
const sequelize = require("../../sequelize");
const Role = require("./role");
const Rule = require("../rule/rule");
/**
 * 角色模型
 */
class RoleRule extends Model {

};
RoleRule.init({
    role_id:{
        type:DataTypes.INTEGER,
        references:{
            model:Role,
            key:"id"
        }
    },
    rule_id:{
        type:DataTypes.INTEGER,
        references:{
            model:Rule,
            key:"id"
        }
    }
}, {
    sequelize,
    timestamps:false,
    modelName: "RoleRule",
    tableName: "role_rule",
})
module.exports = RoleRule